1. Field of the Invention
The present invention relates to a technique of controlling a rotating body. In particular, the invention relates to a technique of calibrating an encoder for detecting a rotational state of the rotating body as well as a technique of detecting an abnormality of the encoder.
2. Description of the Background Art
An optical rotary encoder for detecting a rotational displacement of a rotating body has been proposed. This encoder has a disk-shaped scale provided on the rotational axis of the rotating body. The scale has a plurality of slits along its periphery. Light-emitting devices and light-receiving devices corresponding to the A phase and B phase having a 90-degree phase difference therebetween as well as the Z phase serving as an origin signal which is output once per revolution are arranged with the scale therebetween. Using A, B and Z-phase signals of the encoder, a rotational angle and a rotational direction of the rotating body can be obtained (see Japanese Patent Laying-Open No. 11-64040).
Japanese Patent Laying-Open No. 11-64040 also discloses a technique of detecting an abnormality of the encoder that is found when a rotational direction of the rotating body that is determined based on the A-phase and B-phase signals changes regardless of the fact that the encoder is continuously rotated in the same direction.
Since the encoder disclosed in Japanese Patent Laying-Open No. 11-64040 cannot detect an absolute angle of the rotating body, the need arises for any method of finding a correlation between output signals and a rotational angle of the rotating body. If calibration is to be done using the Z-phase signal which is the origin signal, the calibration fails if an abnormality occurs in the Z-phase signal and consequently the rotating body cannot be controlled.
Although the method proposed in Japanese Patent Laying-Open No. 11-64040 can detect any abnormality in phase relation between the A-phase signal and the B-phase signal, it cannot detect other abnormalities.
In order to appropriately control the rotating body, a technique is required of more correctly detecting the state of the encoder to accurately know the state of the rotating body based on output signals of the encoder.